public class Developer extends Employee
{
	private int teamNumber;
	public Developer(Schedule schedule, int team)
	{
		super(schedule);
		setTeam(team);
	}

	

	@Override
	public void scheduleDay()
	{
		int timeGetIntoOffice = (int) (Math.random() * 30);
		schedule.scheduleEvent(new ArriveToOffice(
			new Time(8, timeGetIntoOffice), this));
		int lunchPeriod = (int) (Math.random() * 30) + 30;
		// Since we have to leave at 5pm, restrict our lunch accordingly.
		if (lunchPeriod + timeGetIntoOffice > 60)
		{
			lunchPeriod = 60 - timeGetIntoOffice;
		}
		schedule.scheduleEvent(new Lunch(new Time(12, 0), this,
			new TimeDuration(0, lunchPeriod)));
		int leaveTime = (int) (Math.random() * (60 - lunchPeriod - timeGetIntoOffice));
		schedule.scheduleEvent(new LeaveOffice(new Time(16, 60 - leaveTime),
			this));
	}

	/**
	 * @return the team
	 */
	public int getTeam() {
		return teamNumber;
	}

	/**
	 * @param team the team to set
	 */
	public void setTeam(int team) {
		teamNumber = team;
	}
}
